package cn.cdeden.knowledge.domain.dto;

import cn.cdeden.common.translation.annotation.Translation;
import cn.cdeden.common.translation.constant.TransConstant;
import cn.cdeden.knowledge.domain.FilesShare;
import cn.cdeden.knowledge.domain.SysUser;
import cn.cdeden.knowledge.domain.vo.PersonalFilesTreeVo;
import cn.cdeden.system.api.domain.vo.RemoteUserVo;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.experimental.Accessors;

//import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
* @author Nick
* @date 2022-10-19
*/
@Data
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@AutoMappers({@AutoMapper(target = FilesShare.class)})
public class FilesShareDto implements Serializable {
    private static final long serialVersionUID = 1L;

//    @ApiModelProperty(value = "ID")
    @NotNull(message = "不能为空", groups = { CommonEntity.Update.class })
    private Long id;


//    @ApiModelProperty(value = "名称")
    private String name;

//    @ApiModelProperty(value = "分享人ID")
    private Long personId;

//    @ApiModelProperty(value = "分享人名称")
    private String personName;

//    @ApiModelProperty(value = "分享人昵称")
@Translation(type = TransConstant.USER_ID_TO_NICKNAME)
    private String personNickname;

//    @ApiModelProperty(value = "文件ID")
    private String fileId;

//    @ApiModelProperty(value = "文件类型")
    private String fileType;

//    @ApiModelProperty(value = "分享形式 1/2 加密/公开")
    private Integer shareForm;

//    @ApiModelProperty(value = "访问密码")
    private String password;

//    @ApiModelProperty(value = "过期时间")
    private Date deadline;

//    @ApiModelProperty(value = "访问权限:预览 0/1 不能/能")
    private Integer isPreview;

//    @ApiModelProperty(value = "访问权限:下载 0/1 不能/能")
    private Integer isDownload;

//    @ApiModelProperty(value = "可访问次数")
    private Integer visitsNumber;

//    @ApiModelProperty(value = "可下载次数")
    private Integer downloadsNumber;

//    @ApiModelProperty(value = "链接地址")
    private String linkAddress;

//    @ApiModelProperty(value = "随机hash值")
    private String hash;

//    @ApiModelProperty(value = "0/1 失效/启用")
    private Integer status;

//    @ApiModelProperty(value = "可访问人ID")
    private String accessibleId;

//    @ApiModelProperty(value = "团队编号")
    private String teamId;

//    @ApiModelProperty(value = "是否设置为团队用户")
    private Boolean teamType;

//    @ApiModelProperty(value = "个人/团队/企业")
    private String shareType;

//    @ApiModelProperty(value = "备注")
    private String remark;

//    @ApiModelProperty(value = "创建编号")
    private String createId;

//    @ApiModelProperty(value = "创建者")
    private String createBy;

//    @ApiModelProperty(value = "创建日期")
    private Date createTime;

//    @ApiModelProperty(value = "更新编号")
    private String updateId;

//    @ApiModelProperty(value = "更新者")
    private String updateBy;

//    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

//    @ApiModelProperty(value = "删除编号")
    private String deleteId;

//    @ApiModelProperty(value = "删除者")
    private String deleteBy;

//    @ApiModelProperty(value = "删除时间")
    private Date deleteTime;

    private String deleteType;

    //个人文件树
    private List<PersonalFilesTreeVo> personalFilesTreeVos;

    //团队文件树
    private List<TeamFilesTreeDto> teamFilesTreeDtos;

    //企业文件树
    private List<EnterpriseFilesTreeDto> enterpriseFilesTreeDtos;

    //可访问人员
    private List<RemoteUserVo> users;


}
